<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ include file="/page/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp" %>
</head>
<script type="text/javascript">

function save(){
	var str_data=$("#templateinfo").serialize();
    $.ajax({
        url:"${ctx}/template/updateSTemplateBase",
        type: "POST",      
        dataType:"json",
        data: str_data,
        async: false,
        success: function(data) {
        	if(data.flag>0){
	            alert("保存成功！");	
	            //window.location.reload();
        	}
        },
        error: function() {
          alert("error");
        }
      });
	
}

function  goBack(){
	//window.location.href='${ctx}/appFrameModule1/appFrameTradeMain?appid=${appid}'
	window.history.back(-1);
	//window.history.go(-2);
}
</script>
 
<body>
<form class="form-horizontal"  id="templateinfo" role="form">
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="templateId">模板标识</label>
                          <div class="col-xs-9">
                             <input class="input-sm form-control" name="templateId"  id="templateId" readonly type="text" value="${STemplateBase.templateId}" placeholder="0010010001"/>
                          </div>
                       </div>
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="templateName">模板名称</label>
                          <div class="col-xs-9">
                             <input class="input-sm form-control" name="templateName"  id="templateName" type="text"  value="${STemplateBase.templateName}" placeholder="标准新增页面模板"/>
                          </div>                           
                       </div>
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="longDesc">模板描述</label>
                          <div class="col-xs-9">
							<textarea class="input-sm form-control"  id="longDesc"  name="longDesc"    rows="3">${STemplateBase.longDesc}</textarea>
                          </div>                       
                       </div>
                       <div class="form-group">
                       		<div class="col-xs-12" align="center">
								<button type="button" class="btn btn-default btn-sm" onclick="save();">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
							</div>
						</div>
                </form>

</body>
</html>
